auth

fun auth(block: JsonObjectBuilder.() -> Unit)

Sets the auth payload sent in the Socket.IO CONNECT packet, using kotlinx.serialization's JsonObjectBuilder DSL so values may be strings, numbers, booleans, or nested objects:

auth {
put("token", "jwt")
putJsonObject("meta") { put("deviceId", 42) }
}

Multiple calls accumulate; later keys override earlier ones.